package com.zby.business.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by BY on 2015/12/29.
 */
public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
    private List fragments = new ArrayList<Fragment>();

    public MyFragmentPagerAdapter(FragmentManager fm, ArrayList<Fragment> fragment) {
        super(fm);
        this.fragments = fragment;

    }

    @Override
    public Fragment getItem(int position) {
        return (Fragment) fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
